package com.weijian.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.weijian.dal.entity.Order;
import org.apache.ibatis.annotations.Select;

import java.util.List;
import java.util.Map;

/**
 * Mapper 接口
 */

public interface OrderMapper extends BaseMapper<Order> {

    @Select("SELECT status, COUNT(*) AS count FROM order_table GROUP BY status")
    List<Map<String, Object>> countOrdersByStatus();

}
